USE [GD1C2012]
GO

/****** Object:  Table [SUPERACIDOS].[Factura]    Script Date: 06/11/2012 09:22:55 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [SUPERACIDOS].[Factura](
	[Factura_Id] [int] IDENTITY(1,1) NOT NULL,
	[Factura_Fecha_Inicio] [datetime] NULL,
	[Factura_Fecha_Fin] [datetime] NULL,
	[Factura_ClienteId] [int] NOT NULL,
	[Factura_Importe] [numeric](18, 2) NOT NULL,
 CONSTRAINT [PK_Factura] PRIMARY KEY CLUSTERED 
(
	[Factura_Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [SUPERACIDOS].[Factura]  WITH CHECK ADD  CONSTRAINT [FK_Factura_Cliente] FOREIGN KEY([Factura_ClienteId])
REFERENCES [SUPERACIDOS].[Cliente] ([Cliente_Id])
GO

ALTER TABLE [SUPERACIDOS].[Factura] CHECK CONSTRAINT [FK_Factura_Cliente]
GO

